package com.sllx.dao.impl;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

import com.sllx.dao.UserDao;
import com.sllx.entity.User;
import com.sllx.util.SessionFactory;

public class UserDaoImpl implements UserDao{
	private SessionFactory sessionFactory;
	private Connection conn;
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}




	public void addUser(User user) throws Exception {
		conn = sessionFactory.getConnection();
		Statement	stmt = conn.createStatement();
		stmt.executeUpdate("insert into user values('92','a','20')");
		stmt.executeUpdate("insert into user values('93','b','20')");
		stmt.executeUpdate("insert into user values('94','c','20')");
		stmt.executeUpdate("insert into user values('65','d','20')");
		stmt.close();
	}

}
